<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<div class="pro_list fr"  >
   <div class="title"  >
   	 <span class="titletxt">您现在的位置：</span>
     <ul> 
       <li class="root">会员中心</li>        
       <li>用户管理</li>  
       <li>个人信息管理</li>            
     </ul>
   </div>
  <c:if test="${not empty ret }">
   	<c:if test="${ret.code ne '200'}">
   		<script type="text/javascript">alertError('${ret.result}');</script>
   		<div id=messager class="messager" >
	         <div class="contentmsg">
	             <h5>提示信息～！</h5>
	             <ul>
	               <li>${ret.result}</li>
	             </ul>
	        </div>
	     <div class="closer" onClick="showHideLayer('messager');" title="关闭"></div>
	    </div>
   	</c:if>
   </c:if>
<div style="margin-top: 10px;">
   <div class="easyui-tabs" data-options="tools:'#tab-tools'" >
     <div title="个人信息" style="padding:10px;">
     <form id="drugBillInfo" method="post" >
		<table width="90%" border="0" cellspacing="0" cellpadding="0" style="margin: 20px;border-top: 1px solid #ddd;">
		  <tbody>
		      <tr>
			    <td class="table_td">登录名</td>
			    <td class="juleft"><p style="float:left" id="loginName" name="loginName"></p></td>
			  </tr>
			  <tr>
			    <td class="table_td">真实姓名</td>
			    <td class="juleft"><input id="userName" name="userName" class="easyui-validatebox" style="width:400px" data-options="required:true,validType:'userName'" missingmessage="请输入用户姓名" title=""></td>
			  </tr>
			  <tr>
			    <td class="table_td">联系电话</td>
			    <td class="juleft"><input id="mobilePhone" name="mobilePhone" class="easyui-validatebox" data-options="validType:'mobilePhone'"></td>
			  </tr>
			  <tr>
			  <tr>
			    <td class="table_td">座机</td>
			    <td class="juleft"><input id="telePhone" name="telePhone" class="easyui-validatebox" data-options="validType:'telePhone'"></td>
			  </tr>
			  <tr>
			    <td class="table_td">电子邮箱</td>
			    <td class="juleft"><input id="email" name="email" class="easyui-validatebox" style="width:200px" data-options="validType:'email'"></td>
			  </tr>
			  <tr>
			  <tr>
			    <td class="table_td">QQ</td>
			    <td class="juleft"><input id="qq" name="qq" class="easyui-validatebox" data-options="validType:'qq'"></td>
			  </tr>
			  <tr>
			  <tr>
			    <td class="table_td">联系人</td>
			    <td class="juleft"><input id="linkman" name="linkman" class="easyui-validatebox" data-options="validType:'linkman'"></td>
			  </tr>
			  <tr>
			    <td class="table_td">地址</td>
			    <td class="juleft"><input id="address" name="address" class="easyui-validatebox" style="width:400px" data-options="validType:'address'"></td>
			  </tr>
			 <tr>
			 	<td   align="center"  ></td>
			 	<td   align="center" class="juleft" style="border: 0;padding-top: 10px;">
			 	    <a onclick="submitForm()"  class="easyui-linkbutton l-btn" data-options="iconCls:'icon-save'" style="padding-left: 10px;padding-right: 10px;">Save</a>
			 	</td>
			 </tr>
		</tbody>
	 </table>
	 </form>
	 </div>
	 <!-- 
	 <div title="企业信息" style="padding:10px;">
	     <form id="drugBillInfo" method="post" >
			<table width="90%" border="0" cellspacing="0" cellpadding="0" style="margin: 20px;border-top: 1px solid #ddd;">
			  <tbody>
			  		<tr>
				    <td class="table_td">采购商编号</td>
				    <td class="juleft"></td>
				  </tr>
			      <tr>
				    <td class="table_td">采购商名称</td>
				    <td class="juleft"></td>
				  </tr>
				  
			</tbody>
		 </table>
		 </form>
	 </div>
	  -->
	  
	 
	 </div>
   </div>       
</div>
<script>
$(function(){
	var param = {};
	//console.log(param);
	$.pmsAjax({
		url:'<c:url value="/user/showUserInformation.s"/>',
		data:param,
		success:function(data){
			if(data.code=="200"){	
				$("#loginName").html(data.data.user.loginName);
				$("#userName").val(data.data.user.userName);
				$("#mobilePhone").val(data.data.user.mobilePhone);
				$("#telePhone").val(data.data.user.telePhone);
				$("#email").val(data.data.user.email);
				$("#qq").val(data.data.user.qq);
				$("#linkman").val(data.data.user.linkman);
				$("#address").val(data.data.user.address);
			}else{
				//alertError(data.result);
			}
		}
	});
});
function submitForm(){
	$('#drugBillInfo').form('submit', {
	    url:'<c:url value="/user/updateUserInformation.s"/>',
	    onSubmit: function(param){
	    	if(!$("#drugBillInfo").form('validate')){
	    		return false;
	    	}
	    },
	    success:function(data){
		    var ret = eval("("+data+")");
	     	if(ret.code=="200"){ 
	     		 layer.msg("修改成功",1, {type: 1,shade: [0.2, '#ccc']});
		    }else{
		    	 layer.msg(ret.result,1, {type: 3,shade: [0.2, '#ccc']});
			}
	    }
	});
}
 

</script>